package org.chameleon.threadpool.entity;

import java.util.concurrent.TimeUnit;

/**
 * 线程池参数
 */
public class ThreadPoolConfig {
    private String poolName;
    /**
     * 核心线程池参数
     */
    private int corePoolSize;

    /**
     * 最大线程池参数
     */
    private int maximumPoolSize;

    /**
     * 队列长度
     */
    private int workQueueSize;

    /**
     * 存活时间
     */
     private long keepAliveTime;

    /**
     * 存活时间单位
     */
    private TimeUnit unit = TimeUnit.SECONDS;

    public String getPoolName() {
        return poolName;
    }

    public void setPoolName(String poolName) {
        this.poolName = poolName;
    }

    public int getCorePoolSize() {
        return corePoolSize;
    }

    public void setCorePoolSize(int corePoolSize) {
        this.corePoolSize = corePoolSize;
    }

    public int getMaximumPoolSize() {
        return maximumPoolSize;
    }

    public void setMaximumPoolSize(int maximumPoolSize) {
        this.maximumPoolSize = maximumPoolSize;
    }

    public int getWorkQueueSize() {
        return workQueueSize;
    }

    public void setWorkQueueSize(int workQueueSize) {
        this.workQueueSize = workQueueSize;
    }

    public long getKeepAliveTime() {
        return keepAliveTime;
    }

    public void setKeepAliveTime(long keepAliveTime) {
        this.keepAliveTime = keepAliveTime;
    }

    public TimeUnit getUnit() {
        return unit;
    }

    public void setUnit(TimeUnit unit) {
        this.unit = unit;
    }
}
